#ifndef DBFABRIC_H
#define DBFABRIC_H

#include "db/qsqlrelationaltablemodelwithreconnection.h"
#include<QSharedPointer>

class DbFabric
{
public:
    DbFabric();

    enum LoopModelColumns
    {
        LOOP_MODEL_ID_POLYGON = 1,
        LOOP_MODEL_ID_LOOP_FORM = 2
    };

    enum PicketModelColumns
    {
        PICKET_MODEL_ID_LOOP = 1,
        PICKET_MODEL_ID_EMF = 2
    };

    enum EmfModelColumns
    {
        EMF_MODEL_ID_EMF = 0
    };

    enum PolygonModelColumns
    {
        POLYGON_MODEL_ID_TYPE = 2
    };

    QSharedPointer<QSqlRelationalTableModelWithReconnection> createPolygonModel();
    QSharedPointer<QSqlRelationalTableModelWithReconnection> createGeneratorLoopModel();
    QSharedPointer<QSqlRelationalTableModelWithReconnection> createPicketModel();
    QSharedPointer<QSqlRelationalTableModelWithReconnection> createEmfModel();
};

#endif // DBFABRIC_H
